<!DOCTYPE html>
<html lang="zh">
{% include "common/form_page_head.html" %}
<body>
<div class="layui-fluid" style="background: #eee; padding: 20px; width: 100%; height: 100%; overflow: auto;">
    <form id='WorkLog' class="layui-form">
        <div class="layui-card">
            <div class="layui-card-header">工作日志</div>
            <div class="layui-card-body">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width:110px;">编码</label>
                        <div class="layui-input-inline">
                            {{ form.fcode(value=nul2em(model.fcode)) }}
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width:110px;">客户</label>
                        <div class="layui-input-inline">
                            {{ form.fcustomer(value=nul2em(model.fcustomer)) }}
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width:110px;">项目</label>
                        <div class="layui-input-inline">
                            {{ form.fproject(value=nul2em(model.fproject)) }}
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width:110px;">计划</label>
                        <div class="layui-input-inline">
                            {{ form.fplan(value=nul2em(model.fplan)) }}
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width:110px;">重要性</label>
                        <div class="layui-input-inline">
                            {{ form.fimportance }}
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width:110px;">紧迫度</label>
                        <div class="layui-input-inline">
                            {{ form.femergency }}
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width:110px;">限制时间</label>
                        <div class="layui-input-inline">
                            {{ form.flimittime(value=nul2em(model.flimittime)) }}
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" style="width:110px;">标题</label>
                    <div class="layui-input-block">
                        {{ form.fname(value=nul2em(model.fname)) }}
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label" style="width:110px;">内容</label>
                    <div class="layui-input-block">
                        {{ form.fcontext }}
                    </div>
                </div>
                <div style="display: none;">
                    {{ form.fid(value=nul2em(model.fid)) }}
                    {{ form.version(value=model.version) }}
                </div>
            </div>
        </div>
        <div class="layui-card">
            <div class="layui-card-body">
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        {{ form.csrf_token }}
                        {{ form.submit }}
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
</body>
<script type="text/javascript">
    let tabid = tlv8.RequestURLParam.getParam("tabid");
    //监听表单提交
    layui.form.on('submit(mainform)', function (data) {
        $.ajax({
            url: "/oa/PersonUse/workLog/editData",
            type: "post",
            async: false,
            data: data.field,
            dataType: "json",
            success: function (re) {
                if (re.state === true) {
                    layui.layer.msg("保存成功！");
                    if (tabid) {
                        tlv8.portal.callBack(tabid, "doQuery", re.data);
                    }
                } else {
                    layui.layer.alert("保存失败：" + re.msg);
                }
            }
        });
        return false;
    });
</script>
</html>